<?php
/**
 * Create date    : 04/10/2012
 * Description    : Me Model
 * Version update : 04/10/2012
 */ 
class Me_Model_Action extends Zend_Db_Table_Abstract
{
    public $_name = '';
    public $_primary = '';
    
   
    public function listAll( $where = array() )
    {
        $query = $this->select();
        return $this->fetchAll( $where );	
    }
    
    public function delete( $where )
    {
        $this->delete( $where );	
    }
    
    public function add($data)
    {
        $this->insert($data);
    }
    
    public function edit( $data, $id )
    {
        if( ! $id ) return false;
        $this->update($data, $this->_primary. '=' .$id);
    }
    
    /**
     * Get info with condition
     * @param where : id or array or string
     */
    public function find_data( $where )
    {
        return $this->find( $where )->toArray(); 
    }
    
   
}
